package gov.pbc.nn.core.bdf.view.frame;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import com.bstek.bdf2.core.view.frame.IFrameShortcutActionRegister;
import com.bstek.dorado.view.widget.Container;
import com.bstek.dorado.view.widget.SubViewHolder;

@Aspect
@Component
public class SendMessageShortcutRegisterInterceptor {

	@Around("execution(* com.bstek.bdf2.core.view.frame.main.register.message.SendMessageShortcutRegister.registerToFrameTop(..))")
	public void registerToFrameTop(ProceedingJoinPoint point) {
		Object[] args = point.getArgs();
		Container container = (Container) args[0];
		
		SubViewHolder subviewHolder = new SubViewHolder();
		subviewHolder.setSubView("gov.pbc.nn.core.bdf.view.frame.SendMessage");
		container.addChild(subviewHolder);
	}

}
